{% extends "base_weblog.html" %}

{% block title %}Weblog | {{ object.headline|escape }}{% endblock %}

{% load humanize %}
{% block content %}
	
	<div class="block last">
		<h2>{{ blog.title }}</h2>
		<div class="bbody">Posted by <strong>{{ blog.author }}</strong> | <span class="date">{{ blog.publish_date|naturalday:"F j, Y" }} @ {{ blog.publish_date|date:"H:i" }}</span>{% if blog.tags %}<span class="tags"> | Filed under: {% for tag in blog.tags %}<a href="/blog/tag/{{tag.name|slugify}}/">{{ tag.name }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</span>{% endif %}</div>
		<div class="bbody">
			{{ blog.lead }}
			{{ blog.body }}
		</div>
	</div>

	{% load comments %}
	{% get_comment_list for blog as comment_list %}

	{% if comment_list %}
	<div id="content-secondary" class="block last">
		<h2 id="comments">Comments</h2>
		<div class="bbody">
			{% for comment in comment_list %}
			<div class="comment" id="c{{ comment.id }}">
				<div class="bbody">Posted by <strong>{{ comment.user_name|escape }}</strong> | <span class="date">{{ comment.submit_date|naturalday:"F j, Y" }} @ {{ comment.submit_date|date:"H:i" }}</span>{% if comment.user_url %} | <a href="{{ comment.user_url|escape }}">{{ comment.user_url|escape }}</a>{% endif %}</div>
				<div class="bbody">{{ comment.comment|linebreaks }}</div>
			</div>
			{% endfor %}
		</div>
	</div>
	{% endif %}

	{% if blog.comments_enabled %}
	<div id="comments-form" class="block last">		
		<h2>Post a comment</h2>
		<div class="bbody">
			{% render_comment_form for blog %}
		</div>
	</div>
	{% endif %}
{% endblock %}
